package com.coderside.fragment.arithmetic.packchars;

public class Element {

	private int start;
	private int nextStart;
	private int length;
	private Cursor next;
	private int section;
	private String description;

	Element(int a, int b, int len, int z) {
		this.start = a;
		this.nextStart = b;
		this.length = len;
		this.section = z;
		this.description = a + "-" + (a + len) + "  " + b + "-" + (b + len);
	}

	public void setXY(int x, int y) {
		next = new Cursor(x, y);
	}

	private Element(int a, int b) {
		this.start = a;
		this.nextStart = b;
	}

	public static void main(String[] args) {
		Element e = new Element(0, 20, 10, 1);
		System.out.println(e);
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getNextStart() {
		return nextStart;
	}

	public void setNextStart(int nextStart) {
		this.nextStart = nextStart;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public Cursor getNext() {
		return next;
	}

	public void setNext(Cursor next) {
		this.next = next;
	}

	public int getSection() {
		return section;
	}

	public void setSection(int section) {
		this.section = section;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public String toString() {
		return description;
	}
}
